package finalgame.Engine;

import finalgame.Engine.pokemon.Pokemon;
import finalgame.Engine.trainer.*;
public class Catch {
	
	public static boolean catchPokemon(Pokemon p){
		double randomnumber = Math.random();
		double pokemonNumber = p.getHP()/p.getMaxHP();
		if(p.getHP()/p.getMaxHP()<.5){
			if(randomnumber>=pokemonNumber){
				return true;
			}
		}
		return false;
	}
	
}
